//
//  Extension+UIimage.swift
//  上海微博
//
//  Created by zhangliming on 16/2/23.
//  Copyright © 2016年 zhangliming. All rights reserved.
//

import UIKit

extension UIImage {

   class func zh_siglePoint_image(color:UIColor) -> UIImage {

        ///创建一个单点图片,开启上下文

        UIGraphicsBeginImageContextWithOptions(CGSize(width: 1, height: 1), false, UIScreen.mainScreen().scale)

        ///设置渲染区域

        color.setFill()

        UIRectFill(CGRect(x: 0, y: 0, width: 1, height: 1))

        //从上下文中获取图片

        let result = UIGraphicsGetImageFromCurrentImageContext()

        UIGraphicsEndImageContext()

        return result
    }



}
